import request from '@/utils/request'

const service = window.CONFIG.services.admin + '/admin/adding'

// 查询【批量加好友】列表
export function listAdding(query) {
  return request({
    url: service+'/list',
    method: 'get',
    params: query
  })
}

//查询【下拉框员工】信息
export function getCustomers(query) {
  return request({
    url: '/admin/sop/queryDeptMsg',
    method: 'get',
    params: query
  })
};

//查询【部门员工】信息
export function queryCustomers(params) {
  return request({
    url: '/admin/sop/queryUserMsg',
    method: 'get',
    params,
  })
};

// 查询【批量加好友表格】详细
export function getAdding(batchAddingId) {
  return request({
    url: service + '/' + batchAddingId,
    method: 'get'
  })
}

// 添加【自动提醒】
export function addWainingAuto(data) {
  return request({
    url: service + '/addWainingAuto',
    method: 'post',
    data: data
  })
}

// 添加客户
export function rejoin(data) {
  return request({
    url: service + '/rejoin',
    method: 'post',
    data,
  })
}

// 添加客户
export function add(data) {
  return request({
    url: service + '/add',
    method: 'post',
    data,
  })
}

// 修改客户
export function updateAdding(data) {
  return request({
    url: service + '/edit',
    method: 'post',
    data,
  })
}

// 删除客户
export function delAdding(data) {
  return request({
    url: service + '/remove',
    method: 'get',
    params: data,
  })
}

// 导出
export function exportAdding(query) {
  return request({
    url: service+'/export',
    method: 'get',
    params: query
  })
}

//获取客户标签
export function getTag(params){
  return request({
    url: service+'/queryCustomerTag',
    method: 'get',
    params,
  })
}

//修改标签
export function updateCustomerTag(data) {
  return request({
    url: service + '/updateCustomerTag',
    method: 'post',
    data,
  })
}

//回显自动提醒配置信息
export function queryWarningAuto(params){
  return request({
    url: service+'/queryWarningAuto',
    method: 'get',
    params,
  })
}
